package com.tensquare.friend.client;
/*
 *ClassName:UserClient
 *Description:调用user模块的接口
 *@author:可爱的大鸭子
 */

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@Component                          //用于防止idea的自动注入报错
@FeignClient("tensquare-user")      //指定从哪个服务中调用功能
public interface UserClient {
    /**
     * 增加粉丝数
     * @param userid
     * @param x
     */
    @RequestMapping(value="/user/incfans/{userid}/{x}",method= RequestMethod.POST)
    //@PathVariable注解一定要指定参数名称，否则出错
    public void incFanscount(@PathVariable("userid") String userid,@PathVariable("x") int x);
    /**
     * 增加关注数
     * @param userid
     * @param x
     */
    @RequestMapping(value="/user/incfollow/{userid}/{x}",method=
            RequestMethod.POST)
    public void incFollowcount(@PathVariable("userid") String userid,@PathVariable("x") int x);
}
